<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021\7\27 0027
 * Time: 11:23
 */
//$redis = new \Redis();
//$redis->connect('10.0.18.2', '6379');
//$redis->auth('123456');
//$third_account=$redis->IPop('thrid_account',['access_token','expiration_time']);

function test01()
{
    $redis = new Redis();
    $redis->connect('10.0.18.2', '6379');
    $redis->auth('123456');
    $arr = array('h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd');
    foreach ($arr as $v) {
        $redis->rpush("mylist", $v);
    }

} function test02(){
    $redis = new Redis();
    $redis->connect('10.0.18.2', '6379');
    $redis->auth('123456');
    //list类型出队操作
    $value = $redis->lpop('mylist');
    if($value){
        echo "出队的值".$value;
    }else{
        echo "出队完成";
    }
}
test01();
test02();
?>

